import request from "./request";

// 获取全部借阅历史
export function getAllBorrow(){
  return request.get('api/borrow/selectall');
}
//查询用户的借阅记录
export function getBorrowByUserName(userId) {
  return request.get(`find_borrow_by_user_id?userId=${userId}`);
}
//查询图书的借阅记录
export function getBorrowByIsbn(isbn) {
  return request.post('/api/borrow/selectbyisbn',{
    isbn,
  });
}
//删除图书借阅记录
export function deleteBorrow(userName,isbn) {
  return request.delete(`api/borrow/deleteby?userName=${userName}&isbn=${isbn}`);
}
